package com.example.springaop.controller;

import com.example.springaop.config.MyAspect;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping("/Test")
public class TestCotroller {
    @MyAspect
    @RequestMapping("/t1")
    public String t1(){
        log.info("t1");
        return "t1";
    }
    @RequestMapping("/t2")
    public String t2(){
        int x=10/0;
        log.info("t2");
        return "t2";
    }

}
